package com.ruoyi.common.utils.orderid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;



/**
 * redis的increment 递增方法 | 处理防重复和并发问题
 */
@Component
public class OrderNumberCodeUtils {
    private static final String PREFIX = "";
    private static final String DATE_FORMAT = "yyyyMMdd";
    private static final String ORDER_SERIAL_NUMBER = "order_serial_number";

    private static RedisTemplate redisTemplate;


    @Autowired
    public void redisTemplate(RedisTemplate redisTemplate){
        OrderNumberCodeUtils.redisTemplate = redisTemplate;
    }
}
